/*
 * @Author: libing 9852442+liu-sheng-8667@user.noreply.gitee.com
 * @Date: 2024-05-22 22:57:21
 * @LastEditors: xuezhuangzhuang xzz6996@qq.com
 * @LastEditTime: 2025-03-09 21:06:47
 * @FilePath: \crm\apis\customer\index.js
 * @Description:
 */
import { service } from "@/config/request";
import qs from "qs";
// 客户列表
export function getCompanyListPage(params = {}) {
  return service({
    path: "/customer/jcCustom/customPage",
    method: "get",
    params,
  });
}
// 获取我的客户列表(用户对应的公司) customPage
export function getCompanyList(params = {}) {
  return service({ path: "/customer/jcCustom/page", method: "get", params });
}

// 客户详情
export function getCompanyInfo(id) {
  return service({ path: `/customer/jcCustom/${id}`, method: "get" });
}

// 新增客户
export function addCompany(params = {}) {
  return service({
    path: "/customer/jcCustom",
    method: "post",
    params,
    header: {
      "Content-Type": "application/json; charset=UTF-8",
    },
  });
}

// 修改客户
export function updateCompany(params = {}) {
  return service({
    path: "/customer/jcCustom",
    method: "put",
    params,
    header: {
      "Content-Type": "application/json; charset=UTF-8",
    },
  });
}

// 客户(对应的公司---新增联系人--员工)
export function addCompanyStaff(params = {}) {
  return service({
    path: "/customer/jcCustomContacts",
    params,
    header: {
      "Content-Type": "application/json; charset=UTF-8",
    },
  });
}
// 客户-客户联系人表-查询id
export function getPageid(query) {
  return service({
    path: `/customer/jcCustomContacts/${query.id}`,
    method: "get",
  });
}
// 客户(对应的公司---联系人列表---员工)
export function getCompanyStaffList(params = {}) {
  return service({
    path: "/customer/jcCustomContacts/page",
    params,
    method: "get",
  });
}

// 客户(对应的公司---跟进列表---新增)
export function addCompanyFollow(params = {}) {
  return service({
    path: "/customer/jcCustomFollow",
    params,
    header: {
      "Content-Type": "application/json; charset=UTF-8",
    },
  });
}

// 客户(对应的公司---跟进列表)
export function getCompanyFollowList(params = {}) {
  return service({
    path: "/customer/jcCustomFollow/page",
    params,
    method: "get",
  });
}

// 获取日程接口
export function getCalendarList(params = {}) {
  return service({
    path: "/customer/jcCustomItinerary/page",
    params,
    method: "get",
  });
}
// 新增日程
export function addCalendar(params = {}) {
  return service({
    path: "/customer/jcCustomItinerary",
    params,
    header: {
      "Content-Type": "application/json; charset=UTF-8",
    },

    method: "post",
  });
}

// 客户类型
export function getCustomerTypes(params = {}) {
  return service({
    path: "/customer/jcCustomType/page",
    method: "get",
    params,
  });
}

// 客户等级
export function getCustomerLevels(params = {}) {
  return service({
    path: "/customer/jcCustomLevel/page",
    method: "get",
    params,
  });
}

// 抢入私海
export function getCustomerSeasEdit(data) {
  return service({
    path: `/customer/jcCustom/seasEdit`,
    method: "post",
    data,
    params: data,
    header: {
      "Content-Type": "application/json; charset=UTF-8",
    },
  });
}


export function getSysmessage(query) {
  return service({
    path: `/admin/sysMessage/user/page`,
    method: "get",
    params: query,
  });
}